package com.fishbone.jwt;

/**
 * @author huyaxi
 */
public interface JwtTokenStorage {

    /**
     * Put jwt token pair.
     *
     * @param jwtTokenPair the jwt token pair
     * @param key       the user "account_userId_customerId"
     * @return the jwt token pair
     */
    JwtTokenPair put(JwtTokenPair jwtTokenPair, String key);


    /**
     * Expire.
     *
     * @param userId the user id
     */
    void expire(String userId);


    /**
     * Get jwt token pair.
     *
     * @param key 用户Token的key
     * @return the jwt token pair
     */
    JwtTokenPair get(String key);

}
